package com.sxkj.web.controller.api;

import com.sxkj.common.response.ResponseResult;
import com.sxkj.service.pay.XyPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author Zhang Xingliang
 *
 * @description: 秤端发起所有支付、红包、微信二维码请求都写在这里面
 * @date 2019-12-31 15:58:40
 */
@RestController
@RequestMapping("/api/pay")
public class PayApiController {


	@Bean

	public PayApiController helloController(){

		return new PayApiController();

	}

	@Autowired
	private XyPayService xyPayService;



	/************************** 秤端支付相关接口 begin *****************************************/
	/**
	 * @author Zhang Xingliang
	 * @description 扫付款码付款
	 * @date 14:18 2019/11/23
	 * @param orderC
	 * @return com.jkr.common.base.Result
	 **/
/*	@RequestMapping(value = "/xyMicroPay", method = RequestMethod.POST)
	public ResponseResult xyMicroPay(@RequestBody OrderC orderC ) {
		try {
			Map<String,String> resultMap = orderCService.xyMicroPay(orderC);
			return ResponseResult.success(resultMap);
		} catch (Exception e) {
			return ResponseResult.failure(e.toString());
		}

	}*/

	/**
	 *
	 * @title: xyMicroQuery
	 * @author: daixiaowei
	 * @date: 2019年11月26日 下午 03:56:25
	 * @description: 查询订单状态
	 * @param: map
	 * @return:
	 */
/*	@RequestMapping(value = "/xyMicroQuery", method = RequestMethod.POST)
	public ResponseResult xyMicroQuery(@RequestBody  Map<String,String> map) {
		try {
			Map<String,String> resultMap= orderCService.xyUnifiedTradeQuery(map);
			return ResponseResult.success(resultMap);
		} catch (Exception e) {
			return ResponseResult.failure(e.toString());
		}
	}*/

	/**
	 * @author Zhang Xingliang
	 * @description 微信内页面付款
	 * @date 14:33 2020/1/3
	 * @param map
	 * @return com.sxkj.common.response.ResponseResult
	 **/
/*	@RequestMapping(value = "/weixinJsPay", method = RequestMethod.POST)
	public ResponseResult weixinJsPay(@RequestBody  Map<String,String> map) {
		try {
			map.put("key","");
			Map<String,String> resultMap= orderCService.weixinJsPay(map);
			return ResponseResult.success(resultMap);
		} catch (Exception e) {
			return ResponseResult.failure(e.toString());
		}
	}*/

	/************************** 秤端支付相关接口 end *****************************************/
	/************************** 秤端 微信红包接口相关接口 begin *******************************/


	/************************** 秤端 微信红包接口相关接口 end  ********************************/

}
